<?php 

/*$arr=[45,478,89,78,12,443];*/


/*function num ($arr){
$no=0;
 	for ($i=0; $i <count($arr) ; $i++) { 
 		if ($no<$arr[$i]) {
 			$no=$arr[$i];	
 		}
 	}
	return $no;
}



echo num($arr);*/
/*$res=num($arr);
var_dump($res);*/

/*function aaa($x){	
	$max=$x[0];
	foreach ($x as $v) {
		if($v>$max){
			$max=$v;
		}
	}

	return $max;
}
$res = aaa($arr);
var_dump($res);*/

/*foreach ($arr as $k => $v) {
	echo $k."=>".$v;
	echo "<br>";
}*/



/*$arr=[45,478,89,78,12,443];
$arr1=['a','b','c','d','f','g'];


function num($arr,$arr1){
$db=[];
	foreach ($arr as $k => $v) {
			$db[]=$arr[$k];
			$db[]=$arr1[$k];
		}	
	return $db;
}
$res=num($arr,$arr1);
var_dump($res);*/


/*[11,12,13,14],*/

$arrold=[11,22,33,44,66,[11,12,13,14],77,65,15,14];




function num($arr){

	foreach ($arr as $k => $v) {
		if (is_array($v)) {
			foreach ($v as $kk => $vv) {
				if ($vv%2==1) {
			 $arr[$k][$kk]=$vv*2;
				}
			}

		}else{
			if ($v%2==1) {
			 $arr[$k]=$v*2;
			}

		}
	}
	return $arr;
}
$res=num($arrold);
var_dump($res);

 ?>